/*//. class OpenALBuffer
  ../ Holds the sound data for use on sound sources. .//*/

typedef struct _obj_openal_buf_s {
	zend_object std;
	ALuint buf;	
} obj_openal_buffer_s;

typedef struct _obj_openal_bufprop_s {
	int prop;
	int type;
	int size;
} obj_openal_buffer_prop_s;

PHP_METHOD(OpenALBuffer, __construct);
PHP_METHOD(OpenALBuffer, newFromFile);
PHP_METHOD(OpenALBuffer, free);

zend_object_value obj_openal_buffer_new(zend_class_entry * TSRMLS_DC);
zend_object_value obj_openal_buffer_mknew(zend_class_entry *, obj_openal_buffer_s ** TSRMLS_DC);
void obj_openal_buffer_clone(void *, void ** TSRMLS_DC);
void obj_openal_buffer_free(void * TSRMLS_DC);

//. magical property handlers.
void obj_openal_buffer_choose_property(const char *, obj_openal_buffer_prop_s *);
zval * obj_openal_buffer_read_property(zval *,zval *,int TSRMLS_DC);
void obj_openal_buffer_write_property(zval *,zval *,zval * TSRMLS_DC);

zend_class_entry *openalbuffer_ce;
zend_object_handlers obj_openal_buffer_handlers;
void *obj_openal_buffer_org_write_property;
static zend_function_entry openalbuffer_functions[] = {
	PHP_ME(OpenALBuffer, __construct, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
	PHP_ME(OpenALBuffer, newFromFile, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_ALLOW_STATIC)
	PHP_ME(OpenALBuffer, free, NULL, ZEND_ACC_PUBLIC)
	{NULL, NULL, NULL}
};
